﻿using HCQ2_Model;
using HCQ2_Model.SchoolClass;
using HCQ2_Model.VLine.InputDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_IDAL
{
    /// <summary>
    ///  系统管理>用户管理数据层
    /// </summary>
    public partial interface IT_UserDAL
    {
        /// <summary>
        ///  添加用户对象
        /// </summary>
        /// <param name="user">用户对象</param>
        void AddUser(HCQ2_Model.T_User user);
        /// <summary>
        ///  编辑用户对象
        /// </summary>
        /// <param name="user">用户对象</param>
        void EditUser(HCQ2_Model.T_User user,string selUnit);
        /// <summary>
        ///  获取记录条数
        /// </summary>
        /// <param name="keyword"></param>
        /// <param name="unitID"></param>
        /// <returns></returns>
        int GetCountByData(string keyword, int folder_id,string orgUnit);
        /// <summary>
        ///  获取用户数据
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <param name="page">第几页</param>
        /// <param name="rows">每页量</param>
        /// <returns></returns>
        List<HCQ2_Model.ViewModel.SysAdmin.UserModel> GetUserLimt(string keyword,string orgUnit,int page,int rows, string inDate, string outDate, string roleCode, int status = -1);
        /// <summary>
        ///  根据组织机构获取用户
        /// </summary>
        /// <param name="unitid">组织机构代码</param>
        /// <param name="keyword">关键字</param>
        /// <param name="page">第几页</param>
        /// <param name="rows">每页量</param>
        /// <returns></returns>
        List<HCQ2_Model.T_User> GetUserByUnitID(int folder_id, string keyword,string orgUnit, int page, int rows, string inDate, string outDate, string roleCode, int status=-1);

        /// <summary>
        /// 通过学校名称获取下面的用户，用于在添加班级时设置班主任
        /// </summary>
        /// <param name="schoolName">学校名称</param>
        /// <returns></returns>
        List<TeacherSelectList> ListTeacherSelect(string schoolName);
        /// <summary>
        ///  获取用户详细信息
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        List<T_User> GetUserList(string userid);

        /// <summary>
        ///  获取登录总次数
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int GetLoginNum(LoginNumInputDto dto);
        /// <summary>
        ///  获取系统用户数
        /// </summary>
        /// <param name="unitDto"></param>
        /// <returns></returns>
        int GetSysUserNum(SysUserInputDto unitDto);
        /// <summary>
        ///  获取系统在线人数
        /// </summary>
        /// <param name="unitDto"></param>
        /// <returns></returns>
        int GetSysLineUserNum(SysUserInputDto unitDto);
    }
}
